<script setup>

import Demo51 from "@/components/Demo51.vue";
import {provide, ref} from "vue";
const count=ref(0)
const str=ref("string");
const  setCount=(num,num1)=>{
  count.value++
  str.value=num+num1
}
provide('count',count)
provide('setCount',setCount)
</script>

<template>
  demo5 跨层传递数据{{count}} {{str}}
  <p/>
<demo51></demo51>
</template>

<style scoped>

</style>